export default {
  name: [
    { required: true, message: "活动名称不能为空", trigger: "blur" },
    { min: 1, max: 15, message: "长度在 1 到 15 个字符", trigger: "blur" }
  ],

  time: [{ required: true, message: "活动时间不能为空", trigger: "blur" }],
  uid: [{ required: true, message: "请选择用户", trigger: "change" }],
  goods_spu_id: [
    {
      required: true,
      message: "请选择物品",
      trigger: "change"
    }
  ],
  num: [
    { required: true, message: "借出数量不能为空", trigger: "blur" },
    {
      pattern: /([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])/,
      message: "请输入大于零的数字",
      trigger: "blur"
    }
  ],
  num_limit: [
    { required: true, message: "用户限购不能为空", trigger: "blur" },
    {
      pattern: /([1-9][0-9]*(\.[0-9]*[1-9])?|0\.[0-9]*[1-9])/,
      message: "请输入大于零的数字",
      trigger: "change"
    }
  ]
};
